home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux.help,comp.lang.c
- Path: zeno.fit.edu!ccurtis
- From: ccurtis@ee.fit.edu (Christopher W. Curtis)
- Subject: strncpy bug?
- Message-ID: <ccurtis.826776589@ee.fit.edu>
- Sender: news@zeno.fit.edu (USENET NEWS SYSTEM)
- Nntp-Posting-Host: pram.ee.fit.edu
- Organization: Florida Tech, CP/EE Dept.
- Date: Thu, 14 Mar 1996 04:09:49 GMT
-
- Hi.
-
- I was wondering if this is a Linux thing (kernel 1.2.1) or a
- more general 'problem'. If you call strncpy as such:
- strncpy( dest, NULL, x );
- it will seg fault. Is this common among all platforms, or
- just with Linux?
-
- The man page says nothing about it, but I would have presumed
- that if str[n]cpy were passed NULL as a source, it would
- merely catenate the destination. Did I presume wrong?
-
- Thanks,
- --
- Christopher Curtis, Sun SysAdmin - http://www.ee.fit.edu/users/ccurtis
- Florida Institute of Technology - telnet bofh.engr.wisc.edu 666
- Melbourne, Florida USA - Member, Team OS/2
-